<script type="text/javascript">
    function xls_upload_success(file, data, $upload) {
        var json = $.parseJSON(data);
        console.log(json);
        $(this).alertmsg('info', '导入成功！')
    }
</script>
<div class="bjui-pageHeader">
    <div class="toolBar">
        <div class="btn-group" role="group" aria-label="操作栏">
            <a type="button" class="btn btn-success" href="${wwwroot}/admin/server/add" data-toggle="navtab" data-id="form"><i class="fa fa-plus"></i>新增</a>
            <a type="button" class="btn btn-danger" href="${wwwroot}/admin/server/delete?ids={#bjui-selected}" data-toggle="doajax" data-confirm-msg="确定要删除选中项吗？" data-id="form" data-mask="true"><i class="fa fa-trash-o"></i>删除选中行</a>
            <#--<a type="button" class="btn btn-danger" href="${wwwroot}/admin/server/excel/export" data-toggle="doajax" data-id="form" data-mask="true"><i class="fa fa-trash-o"></i>导出excel</a>-->
            <a type="button" class="btn btn-default" href="${wwwroot}/admin/server/excel/export?ids={#bjui-selected}" data-toggle="doexport"  data-mask="true"><i class="fa fa-sign-out"></i>导出excel</a>
            <#--<div  class="btn btn-default"-->
               <#--id="fileInput-custom-i[#index#]"-->
               <#--data-toggle="upload"-->
               <#--data-uploader="/admin/server/excel/import"-->
               <#--data-file-size-limit="1024000000"-->
               <#--data-file-type-exts="*.xls;*.xlsx;"-->
               <#--data-multi="false"-->
               <#--data-auto="true"-->
               <#--data-on-upload-success="xls_upload_success"-->
            <#--></div>-->
            <a id="fileInput-custom-i[#index#]"
                 data-toggle="upload"
                 data-uploader="/admin/server/excel/import"
                 data-file-size-limit="1024000000"
                 data-file-type-exts="*.xls;*.xlsx"
                 data-button-text="导入excel"
                 data-multi="false"
                 data-auto="true"
               data-preview-img="false"
               data-icon="sign-in"
                 data-on-upload-success="xls_upload_success"></a>
        </div>
    </div>
    <form id="pagerForm" data-toggle="ajaxsearch" action="${wwwroot}/admin/server/list" method="post">
        <input type="hidden" name="pageSize" value="">
        <input type="hidden" name="pageCurrent" value="">
        <input type="hidden" name="orderField" value="">
        <input type="hidden" name="orderDirection" value="">
        <div class="bjui-searchBar">
			<label>别名：</label><input type="text" id="alias" name="alias" value="${(server.alias)!}"  class="form-control" size="10">&nbsp;				    			
			<#--<label>代理ID：</label><input type="text" id="agentId" name="agentId" value="${(server.agentId)!}"  class="form-control" size="10">&nbsp;				    			-->
			<#--<label>分组类型：</label><input type="text" id="groupType" name="groupType" value="${(server.groupType)!}"  class="form-control" size="10">&nbsp;				    			-->
			<label>业务类型名称：</label><input type="text" id="bizTypeName" name="bizTypeName" value="${(server.bizTypeName)!}"  class="form-control" size="10">&nbsp;
			<#--<label>操作系统：</label><input type="text" id="opSystem" name="opSystem" value="${(server.opSystem)!}"  class="form-control" size="10">&nbsp;				    			-->
			<#--<label>系统级别：</label><input type="text" id="sysRank" name="sysRank" value="${(server.sysRank)!}"  class="form-control" size="10">&nbsp;				    			-->
			<label>地址：</label><input type="text" id="host" name="host" value="${(server.host)!}"  class="form-control" size="10">&nbsp;
			<label>备注：</label><input type="text" id="note" name="note" value="${(server.note)!}"  class="form-control" size="10">&nbsp;
            <button type="submit" class="btn btn-primary" data-icon="search">查询</button>&nbsp;
            <a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true);" data-icon="undo">清空查询</a>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table data-toggle="tablefixed" data-width="100%" data-nowrap="true" data-selected-multi="true">
        <thead>
            <tr>
				<th width="50">No.</th>                
    			<th data-order-direction="" data-order-field="alias">别名</th>               
    			<#--<th data-order-direction="" data-order-field="agentId">代理ID</th>               -->
    			<th data-order-direction="" data-order-field="groupType">分组类型</th>               
    			<#--<th data-order-direction="" data-order-field="bizTypeId">业务类型ID</th>               -->
    			<th data-order-direction="" data-order-field="bizTypeName">业务类型名称</th>               
    			<th data-order-direction="" data-order-field="opSystem">操作系统</th>               
    			<th data-order-direction="" data-order-field="sysRank">系统级别</th>               
    			<th data-order-direction="" data-order-field="host">地址</th>               
    			<#--<th data-order-direction="" data-order-field="user">账号</th>               -->
    			<#--<th data-order-direction="" data-order-field="pass">密码</th>               -->
                <th data-order-direction="" data-order-field="team">组别</th>
    			<th data-order-direction="" data-order-field="note">备注</th>               
    			<th data-order-direction="" data-order-field="createDate">创建时间</th>               
                <th width="150">操作</th>
            </tr>
        </thead>
        <tbody>
        <#list pageCtx.rows as row>
        	<tr data-id="${(row.id)!}">
				<td>${(row_index+1)!}</td>	        	
                 <td title="${(row.alias)!}">${(row.alias)!}</td>
                 <#--<td title="${(row.agentId)!}">${(row.agentId)!}</td>-->
                 <td title="${(row.groupType)!}">${(row.groupType)!}</td>
                 <#--<td title="${(row.bizTypeId)!}">${(row.bizTypeId)!}</td>-->
                 <td title="${(row.bizTypeName)!}">${(row.bizTypeName)!}</td>
                 <td title="${(row.opSystem)!}">${(row.opSystem)!}</td>
                 <td title="${(row.sysRank)!}">${(row.sysRank)!}</td>
                 <td title="${(row.host)!}">${(row.host)!}</td>
                 <#--<td title="${(row.user)!}">${(row.user)!}</td>-->
                 <#--<td title="${(row.pass)!}">${(row.pass)!}</td>-->
                 <td title="${(row.team.label)!}">${(row.team.label)!}</td>
                 <td title="${(row.note)!}">${(row.note)!}</td>
                 <td title="${(row.createDate?string('yyyy-MM-dd HH:mm:ss'))!}">${(row.createDate?string('yyyy-MM-dd HH:mm:ss'))!}</td>
                <td>
                    <a href="${wwwroot}/admin/server/edit?id=${(row.id)!}" class="btn btn-blue" data-toggle="navtab" data-id="form" data-reload-warn="本页已有打开的内容，确定将刷新本页内容，是否继续？" data-title="编辑">编辑</a>
                    <a href="${wwwroot}/admin/server/delete?ids=${(row.id)!}" class="btn btn-red" data-toggle="doajax" data-confirm-msg="确定要删除该行信息吗？">删</a>
                    <a href="${wwwroot}/console/xterm?serverId=${(row.id)!}" class="btn btn-green" target="_blank">控制台</a>
                </td>
        	</tr>
		</#list>	        	
        </tbody>
    </table>  
</div>
<@p.pagination pageCtx=pageCtx pageParam=pageParam/>